#include <queue>
#include <iostream>
#include <string>
#include <stdlib.h>
#include <deque>//双端队列

using namespace std;

int mainC()
{
    queue<char *>myq;
    myq.push("calc");
    myq.push("notepad");
    myq.push("tasklist");
    myq.push("mspaint");

    while(!myq.empty())
    {

        char *p= myq.front();
        system(p);
        myq.pop();
    }


    return 0;
}


int mainD()
{

    deque<int> mydq;
    mydq.push_back(1);
    mydq.push_back(11);
    mydq.push_back(111);
    mydq.push_back(1111);
    mydq.push_back(11111);
    mydq.push_back(111111);
    mydq.push_front(123);
    for(int i=0;i<mydq.size();i++)
    {

        std::cout<<mydq[i]<<std::endl;
    }
    std::cout << ""<< std::endl;
    auto ib = mydq.begin();
    auto ie = mydq.end();
    for(;ib!=ie;ib++)
    {

        std::cout << *ib << std::endl;//ib是智能指针，可以把 星号重载
    }


return 0;
}

//git branch //这条命令是查看分支的
//git add queue.cpp
//git commit -m "提交代码的说明"
//git push origin master


int main()
{

    deque<int> mydq;
    mydq.push_back(1);
    mydq.push_back(11);
    mydq.push_back(111);
    mydq.push_back(1111);
    mydq.push_back(11111);
    mydq.push_back(111111);
    mydq.push_front(123);
    mydq.erase(mydq.begin());
    
    auto ib = mydq.begin();
    auto ie = mydq.end();
    for(;ib!=ie;ib++)
    {

        std::cout << *ib << std::endl;//ib是智能指针，可以把 星号重载
    }


return 0;
}




















